package sbu.cs;

import java.util.Stack;

import android.view.View;

public class ViewStack {

	private Stack<View> stack;
	
	private static ViewStack viewStack;
	private ViewStack(){
		stack = new Stack<View>();
	}
	
	public static ViewStack createViewStack(){
		if(viewStack == null){
			viewStack = new ViewStack();
		}
		return viewStack;
	}
	
	public void pushView(View view){
		stack.push(view);
	}
	
	public View popView(){
		return stack.pop();
	}
	
	public View currentView(){
		return stack.peek();
	}
}
